package zktest;

import java.io.IOException;

import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.ZooKeeperMain;

public class ShowZKData {
	public static void main(String[] args) throws IOException, KeeperException, InterruptedException {
		String url = "192.168.20.135:2181" ;
		ZooKeeper zk = new ZooKeeper(url, 50000, new Watcher(){

			@Override
			public void process(WatchedEvent event) {				
				
			}
			
		}, false) ;
		for(String path: zk.getChildren("/app1", null)) {
			System.out.println(path);
		};
		zk.close();
	}
}
